using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class ContentTypesBLL
	{
		private ContentTypesDAO _ContentTypesDAO;

		public ContentTypesDAO ContentTypesDAO
		{
			get { return _ContentTypesDAO; }
			set { _ContentTypesDAO = value; }
		}

		public ContentTypesBLL()
		{
			ContentTypesDAO = new ContentTypesDAO();
		}
		public List<ContentTypes> GetContentTypess()
		{
			try
			{
				return ContentTypesDAO.GetContentTypess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public ContentTypes GetContentTypes(int ID)
		{
			try
			{
				return ContentTypesDAO.GetContentTypes(ID);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddContentTypes(ContentTypes oContentTypes)
		{
			try
			{
				return ContentTypesDAO.AddContentTypes(oContentTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateContentTypes(ContentTypes oContentTypes)
		{
			try
			{
				return ContentTypesDAO.UpdateContentTypes(oContentTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveContentTypes(ContentTypes oContentTypes)
		{
			try
			{
				return ContentTypesDAO.RemoveContentTypes(oContentTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveContentTypes(int ID)
		{
			try
			{
				return ContentTypesDAO.RemoveContentTypes(ID);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<ContentTypes> DeserializeContentTypess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<ContentTypes>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeContentTypess(string Path, List<ContentTypes> ContentTypess)
		{
			try
			{
				GenericXmlSerializer<List<ContentTypes>>.Serialize(ContentTypess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
